Primitive Class Color

An RGBA or RGB color.

Components are specified in bytes; all values are clamped to [0, 255].

Members

r (int) red component
g (int) green component
b (int) blue component
a (int) alpha component (255 = opaque, 0 = invisible)

Functions

Color(R, G, B)
Color(R, G, B, A)
__tostring(color)


Members

r
(int) red component
g
(int) green component
b
(int) blue component
a
(int) alpha component (255 = opaque, 0 = invisible)

Functions

Color(R, G, B)

Parameters:

  • R int red component
  • G int green component
  • B int blue component

Returns:

    Color A new Color object.
Color(R, G, B, A)

Parameters:

  • R int red component
  • G int green component
  • B int blue component
  • A int alpha component (255 is opaque, 0 is invisible)

Returns:

    Color A new Color object.
__tostring(color)

Parameters:

Returns:

    string A string showing the r, g, b, and a values of the color
generated by TEN-LDoc (a fork of LDoc 1.4.6)